<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>欢迎来到JGrowth!</title>
    <link th:href="@{css/index.css}" th:rel="stylesheet"/>

    <script th:src="@{js/jquery.min.js}"></script>
    <script th:src="@{js/bootstrap-3.1.1.min.js}"></script>
    <!-- banner -->
    <script th:src="@{js/responsiveslides.js}"></script>
    <script th:src="@{js/index.js}"></script>

</head>
<body>
    <div th:include="header"></div>
    <!-- main -->
    <div id="wrapper">
        <!-- banner -->
        <div class="slider">
            <ul class="rslides" id="slider">
                <li th:each="banner:${session.banners}" >
                    <div th:class="'banner' + (${banner.aid}%3)">
                        <div class="banner-grids">
                            <div class="banner-text">
                                <div class="banner-info">
                                    <h1 th:text="${banner.name}"></h1>
                                    <p th:text="${banner.description}"></p>
                                    <a th:href="@{get_article(aid=${banner.aid})}">了解更多</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <!-- banner end -->
        <!-- Article Recommendation -->
        <div class="recommend">
            <!-- Java Basic -->
            <ul>
                <h3><a th:href="@{get_articles_tag(type='Java语言基础')}">Java语言基础</a></h3>
                <li th:each="jb:${session.javabasic}">
                    <div>
                        <h4><a th:href="@{get_article(aid=${jb.aid})}" th:text="${jb.name}"></a></h4>
                        <span th:text="${#dates.format(jb.createdTime,'yyyy年MM月dd日 HH:mm')}"></span>
                    </div>
                    <img th:src="@{img/dog.jpg}">
                    <p th:text="${jb.description}"></p>
                </li>
            </ul>
            <!-- Design Patterns -->
            <ul>
                <h3><a th:href="@{get_articles_tag(type='设计模式')}">设计模式</a></h3>
                <li th:each="dp:${session.designpattern}">
                    <div>
                        <h4><a th:href="@{get_article(aid=${dp.aid})}" th:text="${dp.name}"></a></h4>
                        <span th:text="${#dates.format(dp.createdTime,'yyyy年MM月dd日 HH:mm')}"></span>
                    </div>
                    <img th:src="@{img/dog.jpg}">
                    <p th:text="${dp.description}"></p>
                </li>
            </ul>

        </div>
        <!-- Article Recommendation end -->
    </div>
    <!-- main end -->
</body>
</html>